<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #container {
      width: 100%;
      height: 200px;
      line-height: 200px;
      text-align: center;
      color: #fff;
      background-color: #444;
      background-size: 30px;
    }
  </style>
</head>

<body>
  <div id="container"></div>
  <button>取消防抖</button>
  <script src="https://cdn.bootcdn.net/ajax/libs/underscore.js/1.11.0/underscore.js"></script>

  <script src="./debounce.js"></script>
  <script src="./throttle.js"></script>
  <script>
    let container = document.querySelector('#container')
    let btn = document.querySelector('button')

    let doSomething = function(){
      container.innerHTML = count++
    }
    let count = 0,doSome = throttle(doSomething,1000)
    
    container.onmousemove = doSome
  </script>

</body>

</html>